package com.ljq.epidemic.controller;

import com.ljq.epidemic.component.DataHandler;
import com.ljq.epidemic.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class DataController {

    @Autowired
    private DataHandler dataHandler;

    @Autowired
    private DataService dataService;

    @RequestMapping("/")
    public String index(Model model){
        model.addAttribute("dataList",dataService.list());

        return "index";
    }

}
